<?php

@session_start();
require 'setting/constant.php';

if(isset($_GET['returnurl']) && $_GET['returnurl']) {
	$_SESSION['callback'] = $_REQUEST['returnurl'];
	$_SESSION['security_token'] = $_REQUEST['security_token'];
	
}
else
{
	echo "return url not found!";
	exit;
}

if(array_key_exists("service", $_REQUEST))
{

	if($_REQUEST['service']=="yahoo")
	{
		require 'yahoo/yahoo_connect.php';
	}
	else if($_REQUEST['service']=="google")
	{
		require 'gmail/gmail_connect.php';
	}
	else if($_REQUEST['service']=="live")
	{
		header("Location: ". hostname."hotmail/connect/index.php?service=live");
	}
	else if($_REQUEST['service']=="facebook")
	{
		header("Location: ". hostname."facebook/examples/example.php");
	}
	else if($_REQUEST['service']=="twitter")
	{
		require 'twitter/index.php';
	}
	else if($_REQUEST['service']=="linkedin")
	{
		header("Location: ". hostname."linkedin/demo.php");
	}
	else
	{
		echo "service not found!";
	}
}
else
{
	echo "service not found!";
	exit;
}


